﻿@using Volo.Abp.AspNetCore.Mvc.AntiForgery
@using Volo.Abp.AspNetCore.Mvc.UI.Theme.SB.Bundling
@using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Components
@using Volo.Abp.AspNetCore.Mvc.UI.Theme.SB.Themes.SB.Components.MainNavbar
@using Volo.Abp.AspNetCore.Mvc.UI.Theme.SB.Themes.SB.Components.PageAlerts
@inject IBrandingProvider BrandingProvider
@inject IAbpAntiForgeryManager AbpAntiForgeryManager

@{
    Layout = null;
    //主要是为了配合客户端abp的js脚本使用同一个XSRF-TOKEN
    //第一次会生成两个cookie(.AspNetCore.Antiforgery.xxx|XSRF-TOKEN)两个值不同
    //如果客户端有了.AspNetCore.Antiforgery.xxx就不会再次传给客户端
    AbpAntiForgeryManager.SetCookie();
    var containerClass = ViewBag.FluidLayout == true ? "container-fluid" : "container"; //TODO: Better and type-safe options
}

<!DOCTYPE html>

<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">

    <title>@(ViewBag.Title == null ? BrandingProvider.AppName : ViewBag.Title)</title>

    <abp-style-bundle name="@SBThemeBundles.Styles.Global" />

    @await RenderSectionAsync("styles", false)
</head>


<body class="abp-empty-layout">

    <div class="@containerClass">
        @(await Component.InvokeAsync<PageAlertsViewComponent>())
        @RenderBody()
    </div>

    <abp-script-bundle name="@SBThemeBundles.Scripts.Global" />
    <script type="text/javascript" src="~/Abp/ApplicationConfigurationScript"></script>
    <script type="text/javascript" src="~/Abp/ServiceProxyScript"></script>
    @await RenderSectionAsync("scripts", false)

</body>
</html>